﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DaoZhangDC.aspx.cs" Inherits="Web.Pages.YongShui._5.ShouFeiGL.DaoZhangDC" Theme="Default" ValidateRequest="false"%>
<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <script src="../../../JS/jquery.js" type="text/javascript"></script>
    <script src="../../../JS/AddEditCancel.js" type="text/javascript"></script>

    <script type="text/javascript">
        var tTime = 0;
        function ShowSetPrint() {
            ASPxCallback1.PerformCallback("showSetPrintBtn");
        }
        
        function ExportTo(s, e)
        {
            btnExport.OnClick();
            tTime = window.setInterval(ShowSetPrint, 1800);
        }

        function ASPxCallback1Complete(s, e) {
            //var obj = e.result.parseJSON();
            var obj = eval('(' + e.result + ')');
            if ("showSetPrintBtn" == e.parameter)
            {
                if (obj.succ)
                    $("#tabSetPrinted").show();
                else
                    $("#tabSetPrinted").hide();
                clearInterval(tTime);
            }
        }
    </script>
</head>
<body>
     <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div class="tabletitle1" align="center">
            到账导出
        </div>
         <dx:ASPxCallback ID="ASPxCallback1" ClientInstanceName="ASPxCallback1" runat="server" ClientSideEvents-CallbackComplete="ASPxCallback1Complete" OnCallback="ASPxCallback1_Callback"></dx:ASPxCallback>
         <asp:UpdatePanel ID="updatePanel1" runat="server">
             <ContentTemplate>
                 <div>
                     <div style="float: left; width: 19%; height: 550px; border: 1px solid #7cbec1">
                         <table>
                             <tr>
                                 <td><span style="font-size: 12px; font-weight: bold;">管理块：</span></td>
                                 <td colspan="2">
                                     <asp:Panel runat="server" ID="GuanLiK">
                                         <dx:ASPxComboBox runat="server" ID="cmbGuanLiK" Width="100%">
                                             <Items>
                                                 <dx:ListEditItem Text="全部" Value="quanbu" Selected="true" />
                                             </Items>
                                         </dx:ASPxComboBox>
                                     </asp:Panel>
                                 </td>
                             </tr>
                             <tr>
                                 <td>
                                     <asp:Panel runat="server" ID="Panel1">
                                         <dx:ASPxComboBox runat="server" ID="cmbNianYue" Width="100%">
                                             <Items>
                                                 <dx:ListEditItem Text="账务年月" Value="0" Selected="true" />
                                                 <dx:ListEditItem Text="水量年月" Value="1" />
                                             </Items>
                                         </dx:ASPxComboBox>
                                     </asp:Panel>
                                 </td>
                                 <td>
                                     <dx:ASPxTextBox ID="txtShuiLiangNY" Width="100%" runat="server" MaxLength="6">
                                         <ClientSideEvents KeyUp="function(s,e){inputNum(s);}"/>
                                     </dx:ASPxTextBox>
                                 </td>
                                 <td style="padding-left:5px;">
                                     <dx:ASPxLoadingPanel runat="server" ClientInstanceName="LoadPanel" Text="正在执行查询"></dx:ASPxLoadingPanel>
                                     <dx:ASPxButton ID="btnChaXun" runat="server" Text="查询" OnClick="btnChaXun_Click" UseSubmitBehavior="false">
                                         <ClientSideEvents Click="function(s,e){LoadPanel.Show();}" />
                                     </dx:ASPxButton>
                                 </td>
                             </tr>
                             <tr>
                                 <td colspan="3">
                                     <asp:Panel runat="server" ID="Panel2">
                                         <dx:ASPxComboBox runat="server" ID="cmbLeiXing" Width="100%">
                                             <Items>
                                                 <dx:ListEditItem Text="托收到帐（全部）" Value="0" />
                                                 <dx:ListEditItem Text="本月托收到帐" Value="1" />
                                                 <dx:ListEditItem Text="旧欠托收到帐" Value="2" />
                                                 <dx:ListEditItem Text="托收退票" Value="3" />
                                                 <dx:ListEditItem Text="非托收付委到帐" Value="4" />
                                                 <dx:ListEditItem Text="本月收入（托收、付委）" Value="5" Selected="true" />
                                             </Items>
                                         </dx:ASPxComboBox>
                                     </asp:Panel>
                                 </td>
                             </tr>
                             <tr>
                                 <td colspan="3">
                                     <asp:Panel runat="server" ID="Panel3">
                                         <dx:ASPxComboBox runat="server" ID="cmbShiFouDY" Width="100%">
                                             <Items>
                                                 <dx:ListEditItem Text="全部" Value="2" />
                                                 <dx:ListEditItem Text="已打印" Value="1" />
                                                 <dx:ListEditItem Text="未打印" Value="0" Selected="true" />
                                             </Items>
                                         </dx:ASPxComboBox>
                                     </asp:Panel>
                                 </td>
                             </tr>
                             <tr>
                                 <td colspan="3" align="right">
                                     <dx:ASPxButton ID="btnExportExcel" runat="server" Text="导出excel"  UseSubmitBehavior="false">
                                          <ClientSideEvents Click="ExportTo"/>
                                     </dx:ASPxButton>
                                 </td>
                             </tr>
                            <tr>
                                <td colspan="3" align="right">
                                    <table id="tabSetPrinted" style="display:none">
                                        <tr>
                                            <td style="height: 20px"></td>
                                        </tr>
                                        <tr>
                                            <td style="text-align:right;">
                                                <dx:ASPxButton ID="btnSetPrinted" runat="server" Text="确认送出" ClientInstanceName="btnSetPrinted" ForeColor="Red" AutoPostBack="False" OnClick="btnSetPrinted_Click">
                                                </dx:ASPxButton>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="height: 8px"></td>
                                        </tr>
                                        <tr>
                                            <td style="color: red">
                                                请在另存文件后，点击【确认送出】按钮。
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                         </table>
                     </div>
                     <div style="float: right; width: 80%; height: 550px;">
                         <div>
                             <table>
                                 <tr>
                                     <td>
                                         <span style="font-size: 12px;">用户号：</span>
                                     </td>
                                     <td>
                                         <dx:ASPxTextBox ID="txtYongHuH" Width="100%" runat="server">
                                         </dx:ASPxTextBox>
                                     </td>
                                     <td style="padding-left:5px;">
                                         <dx:ASPxButton ID="btnDingWei" runat="server" Text="定位" OnClick="btnDingWei_Click" UseSubmitBehavior="false">
                                         </dx:ASPxButton>
                                     </td>
                                     <td style="width:20px;">&nbsp;</td>
                                     <td>
                                        <%-- <dx:ASPxTextBox ID="txtJiLu" Border-BorderStyle="None" Width="100%" runat="server" Enabled="false">
                                         </dx:ASPxTextBox>--%>
                                            <dx:ASPxLabel runat="server" ID="zjl" Text="" ForeColor="Blue"></dx:ASPxLabel>

                                     </td>
                                 </tr>
                             </table>
                         </div>
                         <dx:ASPxGridView ID="gvXiangXiXX" runat="server" AutoGenerateColumns="False" KeyFieldName="ROWNUM"  Width="100%" ClientIDMode="AutoID" Settings-ShowVerticalScrollBar="true">
                             <Columns>
                                 <dx:GridViewDataTextColumn FieldName="S_YONGHUH" Caption="用户号" Width="65">
                                 </dx:GridViewDataTextColumn>
                                 <dx:GridViewDataTextColumn FieldName="S_YONGHUM" Caption="用户名称" Width="200">
                                 </dx:GridViewDataTextColumn>
                                 <dx:GridViewDataTextColumn FieldName="I_SLYM" Caption="水量年月" Width="65">
                                 </dx:GridViewDataTextColumn>
                                 <dx:GridViewDataTextColumn FieldName="I_ZWYM" Caption="账务年月" Width="65">
                                 </dx:GridViewDataTextColumn>
                                 <dx:GridViewDataTextColumn FieldName="I_SYSL" Caption="实用水量" Width="70">
                                 </dx:GridViewDataTextColumn>
                                 <dx:GridViewDataTextColumn FieldName="I_JJSL" Caption="加价水量" Width="70">
                                 </dx:GridViewDataTextColumn>
                                 <dx:GridViewDataTextColumn FieldName="N_JJJE" Caption="加价金额（￥）" Width="90" PropertiesTextEdit-DisplayFormatString="0.00">
                                 </dx:GridViewDataTextColumn>
                                 <dx:GridViewDataTextColumn FieldName="I_DSBS" Caption="多收笔数" Width="70" >
                                 </dx:GridViewDataTextColumn>
                                 <dx:GridViewDataTextColumn FieldName="N_DSJE" Caption="多收金额（￥）" Width="90" PropertiesTextEdit-DisplayFormatString="0.00">
                                 </dx:GridViewDataTextColumn>
                                 
                             </Columns>
                             <Settings VerticalScrollBarMode="Visible" VerticalScrollableHeight="450" />
                             <SettingsPager Mode="EndlessPaging" PageSize="100" AlwaysShowPager="true" FirstPageButton-Visible="true" />
                             <Settings ShowFooter="True" />
                             <SettingsBehavior AllowFocusedRow="True"  ColumnResizeMode="Control" />
                         </dx:ASPxGridView>
                     </div>
                     <div>
                         <table id="Table1" runat="server" style="width: 100%">
                             <tr>
                                 <td style="text-align: right;">
                                     
                                 </td>
                             </tr>
                         </table>
                     </div>
                 </div>
             </ContentTemplate>
         </asp:UpdatePanel>
          <div style="display:none;">
            <dx:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server"></dx:ASPxGridViewExporter>
            <dx:ASPxButton ID="btnExport" runat="server" ClientInstanceName="btnExport" Text="导出EXCEL" OnClick="btnExport_Click" UseSubmitBehavior="false">
            </dx:ASPxButton>
        </div>  
    </form>
</body>
</html>
